package com.bootdo.wx.service.impl;

import com.bootdo.common.utils.PageHelperUtils;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.bootdo.wx.dao.MemberScoreDao;
import com.bootdo.wx.domain.MemberScoreDO;
import com.bootdo.wx.service.MemberScoreService;



@Service
public class MemberScoreServiceImpl implements MemberScoreService {
	@Autowired
	private MemberScoreDao memberScoreDao;
	
	@Override
	public MemberScoreDO get(String id){
		return memberScoreDao.get(id);
	}
	
	@Override
	public List<MemberScoreDO> list(Map<String, Object> map){
		return memberScoreDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return memberScoreDao.count(map);
	}
	
	@Override
	public int save(MemberScoreDO memberScore){
		return memberScoreDao.save(memberScore);
	}
	
	@Override
	public int update(MemberScoreDO memberScore){
		return memberScoreDao.update(memberScore);
	}
	
	@Override
	public int remove(String id){
		return memberScoreDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return memberScoreDao.batchRemove(ids);
	}

	@Override
	public PageInfo<Map<String,Object>> getMemberScoreList(Map<String, Object> paramMap) {
		PageHelperUtils.page(paramMap);
		List<Map<String,Object>> list = memberScoreDao.getMemberScoreList(paramMap);
		PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(list);
		return pageInfo;
	}

	@Override
	public BigDecimal getSumByUser(Map<String, Object> map) {
		return memberScoreDao.getSumByUser(map);
	}

	@Override
	public List<Map<String,Object>> getScoreList(Map<String, Object> map) {
		return memberScoreDao.getScoreList(map);
	}

	@Override
	public int getScoreListCount(Map<String, Object> map) {
		return memberScoreDao.getScoreListCount(map);
	}
	
}
